import {createRouter, createWebHistory} from 'vue-router'
import Home from '../views/Home.vue'
import Index from '../views/Index.vue'
import TemplateDetail from '../views/TemplateDetail.vue'
import Editor from '../views/Editor.vue'



const router = createRouter({
    history: createWebHistory(),
    routes: [
        {
            path: '/',
            name: 'index',
            component: Index,
            children: [
                {path: '', name: 'home', component: Home},
                {path: 'template/:id', name: 'template', component: TemplateDetail}
            
            ]
        },
        {
            path: '/editor',
            name: 'editor',
            component: Editor
        }
    ]
})

export default router